home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3dm / audiofile / AFgetloopstart.z / AFgetloopstart
Encoding:
Text File  |  2002-10-03  |  12.2 KB  |  199 lines

  1.  
  2.  
  3.  
  4. aaaaffffGGGGeeeettttLLLLooooooooppppSSSSttttaaaarrrrtttt((((3333ddddmmmm))))                                        aaaaffffGGGGeeeettttLLLLooooooooppppSSSSttttaaaarrrrtttt((((3333ddddmmmm))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      afGetLoopStart, afGetLoopEnd, afGetLoopTrack, afGetLoopMode - get the
  10.      start/end markers, play mode, and track from an AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee structure
  11.      for a specified loop.
  12.  
  13. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  14.      ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////aaaauuuuddddiiiiooooffffiiiilllleeee....hhhh>>>>
  15.  
  16.      iiiinnnntttt mmmmaaaarrrrkkkkiiiidddd  ==== aaaaffffGGGGeeeettttLLLLooooooooppppSSSSttttaaaarrrrtttt((((AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee ffffiiiilllleeee,,,, iiiinnnntttt iiiinnnnssssttttiiiidddd,,,,
  17.                                         iiiinnnntttt llllooooooooppppiiiidddd))))
  18.      iiiinnnntttt mmmmaaaarrrrkkkkiiiidddd  ==== aaaaffffGGGGeeeettttLLLLooooooooppppEEEEnnnndddd((((AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee ffffiiiilllleeee,,,, iiiinnnntttt iiiinnnnssssttttiiiidddd,,,,
  19.                                         iiiinnnntttt llllooooooooppppiiiidddd))))
  20.      iiiinnnntttt ttttrrrraaaacccckkkkiiiidddd ==== aaaaffffGGGGeeeettttLLLLooooooooppppTTTTrrrraaaacccckkkk((((AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee ffffiiiilllleeee,,,, iiiinnnntttt iiiinnnnssssttttiiiidddd,,,,
  21.                                         iiiinnnntttt llllooooooooppppiiiidddd))))
  22.      iiiinnnntttt mmmmooooddddeeee    ==== aaaaffffGGGGeeeettttLLLLooooooooppppMMMMooooddddeeee((((AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee ffffiiiilllleeee,,,, iiiinnnntttt iiiinnnnssssttttiiiidddd,,,,
  23.                                         iiiinnnntttt llllooooooooppppiiiidddd))))
  24.  
  25. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRR
  26.      _f_i_l_e     is an AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee structure, previously created by a call to
  27.               aaaaffffOOOOppppeeeennnnFFFFiiiilllleeee(3dm).
  28.  
  29.      _i_n_s_t_i_d   is a positive integer value which identifies an instrument
  30.               configuration in _f_i_l_e.  Since the number of supported inst
  31.               chunks varies with file format, applications should always
  32.               retrieve this value via aaaaffffGGGGeeeettttIIIInnnnssssttttIIIIDDDDssss(3dm).
  33.  
  34.      _l_o_o_p_i_d   is a positive integer value which identifies a loop structure in
  35.               an instrument parameter chunk.  You obtain _l_o_o_p_i_d's by calling
  36.               aaaaffffGGGGeeeettttIIIInnnnssssttttPPPPaaaarrrraaaammmmLLLLoooonnnngggg(3dm) for AIFF and AIFF-C formats, or
  37.               aaaaffffGGGGeeeettttLLLLooooooooppppIIIIDDDDssss(3dm) for any format.
  38.  
  39. RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
  40.      aaaaffffGGGGeeeettttLLLLooooooooppppSSSSttttaaaarrrrtttt(((()))) returns a positive integer _m_a_r_k_i_d designating the marker
  41.      structure which stores the loop start point, or -1 if there is an error.
  42.  
  43.      aaaaffffGGGGeeeettttLLLLooooooooppppEEEEnnnndddd(((()))) returns a positive integer _m_a_r_k_i_d designating the marker
  44.      structure which stores the loop end point, or -1 if there is an error.
  45.  
  46.      aaaaffffGGGGeeeettttLLLLooooooooppppTTTTrrrraaaacccckkkk(((()))) returns a positive integer _t_r_a_c_k_i_d designating which
  47.      audio track contains the loop, or -1 if there is an error. For all
  48.      currently supported file formats, _t_r_a_c_k_i_d is always AAAAFFFF____DDDDEEEEFFFFAAAAUUUULLLLTTTT____TTTTRRRRAAAACCCCKKKK.
  49.  
  50.      aaaaffffGGGGeeeettttLLLLooooooooppppMMMMooooddddeeee(((()))) returns a positive integer _m_o_d_e which gives the play mode
  51.      for the loop, or -1 if there is an error.
  52.  
  53. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  54.      These routines allow you to obtain information about loops in an audio
  55.      file. Each takes a _l_o_o_p_i_d argument which provides a handle to a set of
  56.      loop parameters.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. aaaaffffGGGGeeeettttLLLLooooooooppppSSSSttttaaaarrrrtttt((((3333ddddmmmm))))                                        aaaaffffGGGGeeeettttLLLLooooooooppppSSSSttttaaaarrrrtttt((((3333ddddmmmm))))
  71.  
  72.  
  73.  
  74.      You can obtain a list of loop ID's for an audio track by calling
  75.      aaaaffffGGGGeeeettttLLLLooooooooppppIIIIDDDDssss(3dm).  Logically, an audio file contains zero or more chunks
  76.      of instrument parameters (specified by _i_n_s_t_i_d handles), and each chunk of
  77.      instrument parameters may contain zero or more loops.
  78.  
  79. AAAAIIIIFFFFFFFF IIIINNNNSSSSTTTTRRRRUUUUMMMMEEEENNNNTTTTSSSS AAAANNNNDDDD LLLLOOOOOOOOPPPPSSSS
  80.      AIFF-C (and AIFF) files contain at most one instrument configuration.
  81.      For this format, you may use the constant AAAAFFFF____DDDDEEEEFFFFAAAAUUUULLLLTTTT____IIIINNNNSSSSTTTT to reference
  82.      the instrument data, but it is always safer to use aaaaffffGGGGeeeettttIIIInnnnssssttttIIIIDDDDssss(3dm).
  83.      AIFF-C (and AIFF) instrument configurations contain two loops, a _s_u_s_t_a_i_n
  84.      _l_o_o_p and a _r_e_l_e_a_s_e _l_o_o_p.  You can determine the ID's for AIFF loops
  85.      directly (without calling aaaaffffGGGGeeeettttLLLLooooooooppppIIIIDDDDssss(3dm)) by calling
  86.      aaaaffffGGGGeeeettttIIIInnnnssssttttPPPPaaaarrrraaaammmmLLLLoooonnnngggg(3dm) with the parameters AAAAFFFF____IIIINNNNSSSSTTTT____SSSSUUUUSSSSLLLLOOOOOOOOPPPPIIIIDDDD and
  87.      AAAAFFFF____IIIINNNNSSSSTTTT____RRRREEEELLLLLLLLOOOOOOOOPPPPIIIIDDDD.  Note that other formats may contain larger numbers of
  88.      loops, and these instrument parameters do not apply to them.
  89.  
  90.      Once you know the ID for a loop, you can determine its play mode by
  91.      calling aaaaffffGGGGeeeettttLLLLooooooooppppMMMMooooddddeeee.  Valid loop modes are:
  92.  
  93.      AAAAFFFF____LLLLOOOOOOOOPPPP____MMMMOOOODDDDEEEE____NNNNOOOOLLLLOOOOOOOOPPPP
  94.           loop is to be ignored
  95.  
  96.      AAAAFFFF____LLLLOOOOOOOOPPPP____MMMMOOOODDDDEEEE____FFFFOOOORRRRWWWW
  97.           forward loop
  98.  
  99.      AAAAFFFF____LLLLOOOOOOOOPPPP____MMMMOOOODDDDEEEE____FFFFOOOORRRRWWWWBBBBAAAAKKKKWWWW
  100.           forward/backward loop
  101.  
  102.      You can obtain marker ID's for the marker structures which contain the
  103.      endpoints for a loop by calling aaaaffffGGGGeeeettttLLLLooooooooppppSSSSttttaaaarrrrtttt(((()))) and aaaaffffGGGGeeeettttLLLLooooooooppppEEEEnnnndddd(((()))).
  104.  
  105. EEEEXXXXAAAAMMMMPPPPLLLLEEEE
  106.      aaaaffffGGGGeeeettttLLLLooooooooppppSSSSttttaaaarrrrtttt(((()))) returns the value 3.  This is the ID of the marker in
  107.      the audio track which labels the beginning of the specified loop.
  108.  
  109.      You call aaaaffffGGGGeeeettttMMMMaaaarrrrkkkkPPPPoooossssiiiittttiiiioooonnnn(3dm) with _m_a_r_k_i_d = 3 to obtain a sample frame
  110.      location in the track.
  111.  
  112.      Suppose you retrieve the marker position 125000 for the loop start
  113.      marker, and marker position 150000 for the loop end marker.  The loop
  114.      consists of sample frames 125001 through 150000.
  115.  
  116.      Remember that markers are positioned "between" audio sample frames.  See
  117.      the AIFF or AIFF-C spec for a detailed explanation of how markers and
  118.      loops work.
  119.  
  120.      aaaaffffGGGGeeeettttLLLLooooooooppppTTTTrrrraaaacccckkkk(((()))) is included in the library as a placeholder for future
  121.      functionality.  It always returns AAAAFFFF____DDDDEEEEFFFFAAAAUUUULLLLTTTT____TTTTRRRRAAAACCCCKKKK for now.
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. aaaaffffGGGGeeeettttLLLLooooooooppppSSSSttttaaaarrrrtttt((((3333ddddmmmm))))                                        aaaaffffGGGGeeeettttLLLLooooooooppppSSSSttttaaaarrrrtttt((((3333ddddmmmm))))
  137.  
  138.  
  139.  
  140. NOTES
  141.      It is now possible to retrieve the loop start and end frame directly
  142.      without using the associated markers (see aaaaffffGGGGeeeettttLLLLooooooooppppSSSSttttaaaarrrrttttFFFFrrrraaaammmmeeee(3dm)).
  143.      This is useful and necessary for audio file formats which support loops
  144.      which are independent of any markers, and for formats which support loops
  145.      but which do not support markers at all.  For formats which always
  146.      associate loops and markers, such as AAAAIIIIFFFFFFFF(4) and WWWWAAAAVVVVEEEE(4),
  147.      aaaaffffGGGGeeeettttLLLLooooooooppppSSSSttttaaaarrrrtttt(((()))) and aaaaffffGGGGeeeettttLLLLooooooooppppEEEEnnnndddd(((()))) will always return a valid ID for a
  148.      marker, but this marker may have been artifically generated by the AF.
  149.      If this is the case, the name of the marker (as retrieved via
  150.      aaaaffffGGGGeeeettttMMMMaaaarrrrkkkkNNNNaaaammmmeeee(3dm)) will be "start mark for loop id x" or "end mark for
  151.      loop id x", where _x is the loop ID.
  152.  
  153. CCCCAAAAVVVVEEEEAAAATTTTSSSS
  154.      These functions may return any number of loops within an inst, not just
  155.      the fixed value of 2 current found in AIFF/AIFF-C files.  Other supported
  156.      file formats have different loop configurations than those in AIFF/AIFF-
  157.      C.
  158.  
  159.      Applications may use the aaaaffffQQQQuuuueeeerrrryyyy(3dm) system to determine whether a
  160.      format supports loops and if so, the number allowed.  A program should be
  161.      written to expect and ignore loop configurations it does not understand.
  162.  
  163. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  164.      afOpenFile(3dm), afGetInstParamLong(3dm), afGetMarkPosition(3dm),
  165.      afGetLoopIDs(3dm), afGetMarkIDs(3dm), aiff(4)
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.